# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=qtcontacts-sqlite
pkgver=0.2.39
pkgrel=0
pkgdesc="A backend for the QtContacts API"
url="https://git.sailfishos.org/mer-core/qtcontacts-sqlite"
arch="all"
license="BSD-3-Clause"
makedepends="
	mlite-dev
	qt5-qtbase-dev
	qt5-qtpim-dev
	"
source="https://git.sailfishos.org/mer-core/qtcontacts-sqlite/-/archive/$pkgver/qtcontacts-sqlite-$pkgver.tar.gz
	0001-fix-build-with-newer-qt.patch
	0002-drop-old-api.patch
	"
subpackages="$pkgname-dev"

build() {
	qmake-qt5 PREFIX=/usr
	make
}

check() {
	make check
}

package() {
	INSTALL_ROOT="$pkgdir" make install
}

sha512sums="ff62b67b96bb150abd06e23b47d13abebb00da05ccf4ed92b269df3cf48f2c0f8ec1312242326ffe6e51f8dee49b6d057976ac759cf4f5fd6342c501f695fd2c  qtcontacts-sqlite-0.2.39.tar.gz
1096452e2326b311c4b14169cf5e0779cf9955c800178bc5b74d1706c76507b4d82442a50d8b707ac5df12f99dd6faf7a2374e554c2159408fa453b10d7f1ff6  0001-fix-build-with-newer-qt.patch
036af277c180584106b92d34dbf90aeda10bcad5fbdfa17b69f4d9c461a01c48bdf93ed07f2c8bd990d6c6e259576013f4e1b77069dfa1abf4206513e319b781  0002-drop-old-api.patch"
